<?php
namespace Home\Controller;
use Think\Controller;
class PublicController extends Controller {

    public function ckLogin($account ='' ,$password = '')
    {
        if ($account == 'admin' && $password == '123456') {
            session('mid',$account);
            $this->success('登录成功，正在跳转。','index.php');
        }else{
            $this->error('登录用户名或密码错误');
        }
    }


    public function logout()
    {
        session('mid',NULL);
        redirect('index.php');
    }
}